﻿using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;

namespace map1
{
    public partial class waitForm : UserControl
    {
        public BackgroundWorker BackgroundWorker { get; set; }
        public waitForm()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            // Remove the control from the layout. 
            this.Visibility = Visibility.Collapsed; 
        }

        private void btnCancelSearch_Click(object sender, RoutedEventArgs e)
        {
            if (BackgroundWorker != null)
                BackgroundWorker.CancelAsync();
        }

    }
}
